<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<jsp:include page="header.jsp"/>

<script src="http://ajax.googleapis.com/ajax/libs/dojo/1.6.1/dojo/dojo.xd.js" type="text/javascript"></script>

<c:if test="${sessionScope.usuario eq null}">
	<c:redirect url="index.jsp"></c:redirect>	
</c:if>

<c:set var="user" value="${sessionScope.usuario}" scope="session"></c:set>

        <style type="text/css">
            body, html { font-family:helvetica,arial,sans-serif; font-size:90%; }
        </style>
        <script src="http://ajax.googleapis.com/ajax/libs/dojo/1.6/dojo/dojo.xd.js" djConfig="parseOnLoad: true">
        </script>
        <script type="text/javascript">
            dojo.require("dojox.charting.Chart2D");
            dojo.require("dojox.charting.plot2d.Pie");
            dojo.require("dojox.charting.action2d.Highlight");
            dojo.require("dojox.charting.action2d.MoveSlice");
            dojo.require("dojox.charting.action2d.Tooltip");
            dojo.require("dojox.charting.themes.MiamiNice");
            dojo.require("dojox.charting.widget.Legend");

            dojo.addOnLoad(function() {
                var dc = dojox.charting;
                var chartTwo = new dc.Chart2D("chartTwo");
                chartTwo.setTheme(dc.themes.MiamiNice).addPlot("default", {
                    type: "Pie",
                    font: "normal normal 11pt Tahoma",
                    fontColor: "black",
                    labelOffset: -30,
                    radius: 80
                }).addSeries("Series A", [{
                    y: 4,
                    text: "Red",
                    stroke: "black",
                    tooltip: "Red is 50%"
                },
                {
                    y: 2,
                    text: "Green",
                    stroke: "black",
                    tooltip: "Green is 25%"
                },
                {
                    y: 1,
                    text: "Blue",
                    stroke: "black",
                    tooltip: "I am feeling Blue!"
                },
                {
                    y: 1,
                    text: "Other",
                    stroke: "black",
                    tooltip: "Mighty <strong>strong</strong><br>With two lines!"
                }]);
                var anim_a = new dc.action2d.MoveSlice(chartTwo, "default");
                var anim_b = new dc.action2d.Highlight(chartTwo, "default");
                var anim_c = new dc.action2d.Tooltip(chartTwo, "default");
                chartTwo.render();
                var legendTwo = new dojox.charting.widget.Legend({
                    chart: chartTwo
                },
                "legendTwo");
            });
        </script>
        <link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/dojo/1.6/dijit/themes/claro/claro.css"
        />

 <div class="bodyCenter" align="center">   

        <div id="chartTwo" style="width: 600px; height: 600px;">
        </div>
        <div id="legendTwo">
        </div>
        
 </div>       
        
        <!-- NOTE: the following script tag is not intended for usage in real
        world!! it is part of the CodeGlass and you should just remove it when
        you use the code -->
        <script type="text/javascript">
            dojo.addOnLoad(function() {
                if (document.pub) {
                    document.pub();
                }
            });
        </script>


<jsp:include page="footer.jsp"/>